#ifndef SYSTHREADPOOL_H
#define SYSTHREADPOOL_H

#include "dbquerythread.h"

class SysThreadPool : public QObject
{
    Q_OBJECT
public:
    Q_INVOKABLE SysThreadPool();
    DbQueryBaseThread* newQueryThread(CnsComponentPtr com, QVariantHash& sv);
    Q_INVOKABLE void f_execTask(CnsComponentPtr com, QVariantHash &sv);
    bool __exhaustTasks(CnsComponentPtr com, QSVHASHLIST &svl, int poolSize, DBQUERYBASETHREADPTRSET& tl);
    bool exhaustTasks(CnsComponentPtr com);
    void delThread(CnsComponentPtr com, DbQueryBaseThread* thread);
};

Q_DECLARE_METATYPE(SysThreadPool*)

#endif // SYSTHREADPOOL_H
